angular.module('model.template', [
        "ngCookies"
])

    .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
        $stateProvider
            .state('botMenu', {
                'abstract': true,
                url: '',
                templateUrl: 'view/template/template.html',
                controller: 'TemplateController'
            })
        ;
    }])

    .controller('TemplateController',['$scope', '$state','$cookieStore','LoginService',function ($scope,$state,$cookieStore,LoginService) {
        $scope.user = "";
        if($cookieStore.get("_user")){
            $scope.user = $cookieStore.get("_user");
        }
        $scope.logout = function(){
            LoginService.userLogout();
            $scope.user = "";
        }
    }])
;

/*导航栏*/
